# Contributor: André Klitzing <aklitzing@gmail.com>
# Maintainer: André Klitzing <aklitzing@gmail.com>
pkgname=curlie
pkgver=1.7.1
pkgrel=4
pkgdesc="Curlie is a frontend to curl that adds the ease of use of httpie"
url="https://curlie.io/"
arch="all"
license="MIT"
depends="curl"
makedepends="go"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rs/curlie/archive/v$pkgver.tar.gz"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	go build -ldflags "-X main.version=$pkgver -X main.date=alpine-r$pkgrel"
}

check() {
	go test
}

package() {
	install -Dm755 curlie "$pkgdir"/usr/bin/curlie
	install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

sha512sums="
c2c1064b78814386694b28560aa154bc1b3cbe001797b325f47bed3139af3ca7c74af84801cf96c46dc7f3738c43416b93586d34674b7c531e87ba06b3e44f0e  curlie-1.7.1.tar.gz
"
